<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'saleReport.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="${staticPath }/static/bootstrap/bootstrap.min.css" />

	<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
	<link rel="stylesheet" href="${staticPath }/static/bootstrap/bootstrap-theme.min.css" />

  </head>
  
  <body style="margin:0;padding:0">
  	<b>备注</b>：商品备货情况，上格为(备货完成的商品件数)，下格为(备货未完成的商品件数)；商品发货情况，上格为(已发货的商品件数)，下格为(未发货的商品件数)；
  	<div style="width:100%;  margin: 0 auto;margin-top:25px"  >
  	<div style="margin-top:10px;text-align: left;margin-bottom:10px;">
  	     <a href="/haierp1/bi/ship/shippingOrderAvg" style="padding-left:5px;"><input type="button" value="下单---发货时效报表"/></a>
    </div>
  		<table class="table table-bordered">
  			<tr class="info">
  				
					<td width="9%" class="text-center">时间</td>
					<td width="9%" class="text-center">支付订单数</td>
					<td width="9%" class="text-center">商品总件数</td>
					<td width="8%" class="text-center">商品备货情况</td>
					<td width="8%" class="text-center">商品发货情况</td>
					<td width="11%" class="text-center">数量类型</td>
					<td class="text-center">发货总数</td>
					<td class="text-center">当天</td>
					<td class="text-center">第一天</td>
					<td class="text-center">第二天</td>
					<td class="text-center">第三天</td>
					<td class="text-center">第四天</td>
					<td class="text-center">第五天</td>
					<td class="text-center">第六天</td>
					<td class="text-center">第七天</td>
					<td class="text-center">大于7天</td>
  			</tr>
	  		<c:if test="${shipList==null || fn:length(shipList) == 0}">  
				<tr>  
		  		<td colspan="4">还没有记录过该商品，快来抢购吧！</td>  
				</tr>  
				</c:if>  
				<c:forEach items="${shipList}" var="ship">
				<tr>
					<td rowspan=2 style="text-align:center;vertical-align:middle">${ship.dimensionDate}</td>
					<td rowspan=2 style="text-align:center;vertical-align:middle">${ship.payOrderNum}</td>
					<td rowspan=2 style="text-align:center;vertical-align:middle;color:blue">${ship.itemTotalNum}</td>
					<td style="color:blue">${ship.stockNum}</td>
					<td style="color:blue">${ship.curentDaySku + ship.oneDaySku + ship.twoDaySku + ship.threeDaySku + ship.fourDaySku + ship.fiveDaySku + ship.sixDaySku + ship.sevenDaySku + ship.otherDaySku}</td>
					<td>发货商品件数</td>
					<td>
						<c:set var="tempSkuQuantity" value="${ship.curentDaySku + ship.oneDaySku + ship.twoDaySku + ship.threeDaySku + ship.fourDaySku + ship.fiveDaySku + ship.sixDaySku + ship.sevenDaySku + ship.otherDaySku}"  />
						${tempSkuQuantity}
					</td>
					<td>${ship.curentDaySku}</td>
					<td>${ship.oneDaySku}</td>
					<td>${ship.twoDaySku}</td>
					<td>${ship.threeDaySku}</td>
					<td>${ship.fourDaySku}</td>
					<td>${ship.fiveDaySku}</td>
					<td>${ship.sixDaySku}</td>
					<td>${ship.sevenDaySku}</td>
					<td>${ship.otherDaySku}</td>
				</tr>
				<tr>
					<td>
						<c:choose>
						   <c:when test="${ship.noStockNum > 0}">  
						        <font color="red">${ship.noStockNum}</font>
						   </c:when>
						   <c:otherwise> 
						     -
						   </c:otherwise>
						</c:choose>
					</td>
					<td>
						<c:choose>
						   <c:when test="${ship.itemTotalNum - tempSkuQuantity > 0}">  
						        <font color="red">${ship.itemTotalNum - tempSkuQuantity}</font>
						   </c:when>
						   <c:otherwise> 
						     -
						   </c:otherwise>
						</c:choose>
					</td>
					<td>发货包裹数</td>
					<td>${ship.pkgQuantity}</td>
					<td>${ship.curentDayPkg}</td>
					<td>${ship.oneDayPkg}</td>
					<td>${ship.twoDayPkg}</td>
					<td>${ship.threeDayPkg}</td>
					<td>${ship.fourDayPkg}</td>
					<td>${ship.fiveDayPkg}</td>
					<td>${ship.sixDayPkg}</td>
					<td>${ship.sevenDayPkg}</td>
					<td>${ship.otherDayPkg}</td>
				</tr>
				</c:forEach>
		</table>  
  	</body>
 	 </div>
</html>





